package com.shenzhenai.it_hei_ma.a07threadmethod4;

/**
 * @author huangzehui
 * @date 2025/8/27 13:16 周三
 * @description
 *
 * 多线程&JUC-09-礼让线程
 * https://www.bilibili.com/video/BV1LG4y1T7n2?spm_id_from=333.788.videopod.episodes&vd_source=e07cc8cc94eb22bd76722071b03cd199&p=9
 */
public class ThreadDemo {


    public static void main(String[] args) {

        /*
        public static void yield() 出让线程/礼让线程
         */

        MyThread t1 = new MyThread();
        MyThread t2 = new MyThread();

        t1.setName("飞机");
        t2.setName("坦克");

        t1.start();
        t2.start();
    }

}
